﻿using System;
using System.Linq;

    class Fibonacci
    {
        static void Main(string[] args)
        {
            int n=int.Parse(Console.ReadLine());
            ulong fibFirst=0;
            ulong fibSecond=1;
            ulong fibNext;
            ulong sumFib = fibFirst+fibSecond;
            Console.WriteLine(fibFirst);
            Console.WriteLine(fibSecond);
            for(int i=1; i<=n; i++)
            {
                fibNext= fibFirst + fibSecond;            
                fibFirst=fibSecond;
                fibSecond=fibNext;
                sumFib = sumFib + fibNext;
                Console.WriteLine(fibNext);
            }
            Console.WriteLine(sumFib);
        }
    }

